////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Copyright (c) Microsoft Corporation.  All rights reserved.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

////////////////////////////////////////////////////////////////////////////
// Portions Copyright (c) 2012 Kentaro Sekimoto  All rights reserved.
////////////////////////////////////////////////////////////////////////////

#include <tinyhal.h>

#if defined(ADS_LINKER_BUG__NOT_ALL_UNUSED_VARIABLES_ARE_REMOVED)
#pragma arm section rwdata = "g_AvailableFSInterfaces"
#endif

extern FILESYSTEM_DRIVER_INTERFACE g_FAT32_FILE_SYSTEM_DriverInterface;
extern STREAM_DRIVER_INTERFACE g_FAT32_STREAM_DriverInterface;
// NOR Flash
//extern struct BlockStorageDevice  g_CQFM3DUINO_BS;
//FileSystemVolume g_CQFM3DUINO_NOR_FS;
// Serial Flash
//extern struct BlockStorageDevice g_SerialFlash_Device;
//FileSystemVolume g_CQFM3DUINO_SERIAL_FS;
// SD CARD
//extern struct BlockStorageDevice  g_SD_BS;
//FileSystemVolume g_SD_FS;
// USB Host
//extern struct BlockStorageDevice g_CQFM3DUINO_USB_Device;
//FileSystemVolume g_CQFM3DUINO_USB_FS;

void FS_AddVolumes()
{
//    FileSystemVolumeList::AddVolume( &g_CQFM3DUINO_NOR_FS, "ROOT", 0, 0, &g_FAT32_STREAM_DriverInterface, &g_FAT32_FILE_SYSTEM_DriverInterface, &g_CQFM3DUINO_BS, 1, FALSE );
//    FileSystemVolumeList::AddVolume( &g_CQFM3DUINO_SERIAL_FS, "ROOT", 0, 0, &g_FAT32_STREAM_DriverInterface, &g_FAT32_FILE_SYSTEM_DriverInterface, &g_SerialFlash_Device, 1, FALSE );
//    FileSystemVolumeList::AddVolume( &g_CQFM3DUINO_USB_FS, "U", 0, 0, &g_FAT32_STREAM_DriverInterface, &g_FAT32_FILE_SYSTEM_DriverInterface, &g_CQFM3DUINO_USB_Device, 1, FALSE );
//    FileSystemVolumeList::AddVolume( &g_SD_FS, "SD", 0, 0, &g_FAT32_STREAM_DriverInterface, &g_FAT32_FILE_SYSTEM_DriverInterface, &g_SD_BS, 0, FALSE );
}

void FS_MountRemovableVolumes()
{
}

FILESYSTEM_INTERFACES g_AvailableFSInterfaces[] =
{
    { &g_FAT32_FILE_SYSTEM_DriverInterface, &g_FAT32_STREAM_DriverInterface },
};

//const size_t g_InstalledFSCount = ARRAYSIZE(g_AvailableFSInterfaces);
const size_t g_InstalledFSCount = 1;

#if defined(ADS_LINKER_BUG__NOT_ALL_UNUSED_VARIABLES_ARE_REMOVED)
#pragma arm section rwdata
#endif
